#pragma once

#include <vector>
#include "cp_info.h"
#include "method_info.h"
#include "field_info.h"
using namespace std;

class ClassFile{
public:
	int magic;
	short minor_version;
	short major_version;
	short constant_pool_count;
	vector<cp_info*> constant_pool;
	short access_flags;
	short this_class;
	short super_class;
	short interfaces_count;
	vector<short> interfaces;
	short fields_count;
	vector<field_info*> fields;
	short methods_count;
	vector<method_info*> methods;
	short attributes_count;
	vector<attribute_info*> attributes;

public:
	void loadClass(string filePath);
	ClassFile(string filePath){
		this->loadClass(filePath);
	};
};
